# -*- coding: utf-8 -*-
from reportlab.pdfgen import canvas
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont

# vertical japanese font file are available at
# http://sanshirou.way-nifty.com/blog/2008/11/705nk-1562.html
# fontName is just an alias
ttfFile = ('vHGKaisho.TTF')
fontName = ('hoge')
pdfmetrics.registerFont(TTFont(fontName, ttfFile))

# paper size of Hagaki is 100mm x 148mm
# canvas size are assigned with points, 1/72 inchi
# if canvas is rotated, coordinates are changed.
# if rotated -90 deg, paper is in the second quadrant.
c = canvas.Canvas("hello.pdf", (283.5, 419.58))
c.rotate(-90)
c.setFont(fontName, 24)
c.drawString(-200, 100, "南千住3-2-10-２")

c.showPage()
c.save()
